The present invention relates generally to database management, and more particularly to automatic collection and analysis of database statistics.
For most database systems, the tasks of performance monitoring and tuning of the database requires the use of sophisticated tools to collect information and analyze the performance of the database system during the execution of a workload. Such methods can often be costly and inefficient to database users. Database performance is typically characterized by the cumulative amount of time users spend waiting for the database server to respond to their requests. System performance statistics are commonly needed for analysis when a problem has been reported to the administrator of the database system. For example, users may experience unsatisfactory response time while browsing web pages that require fetching data from the database. Collecting data after the fact may sometimes produce fruitless results, as some problems are timing related. This is analogous to taking pictures of a crime scene to catch a criminal after the crime has been committed.
Also, existing mechanisms to collect system data are generally difficult to develop and maintain as they involve data selection, storage, analysis, and the disposal of old data in order to free up space for future data collection. This usually incurs extra cost to database customers as they have to purchase sophisticated monitoring tools from third party vendors, as well as hire experienced database administrators to run these tools for monitoring and tuning purposes.
Accordingly, it is desirable to provide systems and methods that automatically track and store performance-related information in a database system. Such information is useful for automatically tuning and analyzing database system performance.